<jsp:useBean id="localeManager" class="com.fescoservice.config.LocaleManager" scope="page" />
<%@ page language="java" import="java.util.Locale"%>
<%@ page language="java" import="com.fescoservice.config.EpResourceBundle"%>
<%@ page language="java" import="java.util.ResourceBundle"%>

<%
	Locale localeIndex = null;
	ResourceBundle tempResource = null;
	String userLanguage = (String)request.getSession().getAttribute("userLanguage");
	String browserLocale = (String)request.getLocale().getLanguage();
	if (userLanguage!=null) localeIndex=new Locale(userLanguage,"");
	if (localeIndex==null) tempResource=localeManager.getBundle(langfilename,browserLocale.toUpperCase());
	else tempResource=localeManager.getBundle(langfilename,localeIndex);
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	EpResourceBundle resource = new EpResourceBundle(tempResource);
%> 